package com.fau.wmbj.server.flowable.listener;

import com.fau.wmbj.server.utils.QueryUtils;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.flowable.task.api.Task;

/**
 * 流程实例监听测试
 *
 * @author jiawei
 * @version 1.0
 * @datetime 2024/5/23 下午4:35
 */
@Slf4j
public class ActExecutionListener implements ExecutionListener {

    @Override
    public void notify(DelegateExecution execution) {
        Task task = QueryUtils.taskQuery().executionId(execution.getId()).singleResult();
        log.info("执行监听【{}】", task.getName());
    }
}
